.SUFFIXES: .F90 .o

MODULE_OBJECTS=param.o global.o gi10.o fptr.o

FUNCTION_OBJECTS=

DATA_STRUCTURE=

IO_OBJECTS=

MATH_OBJECTS=

SOURCE_OBJECTS=main.o set_param.o readinp.o dwrite.o dread.o record_xsec.o kernel.o get_xsec.o lmess.o read_recoil.o \
	memfree.o record_nstop.o get_nstop.o get_estop.o check_range.o init_fptr.o read_nstop.o read_xsec.o find_next.o \
	decompose.o prnres.o save_xsec.o save_nstop.o init_pptr.o find_nstop.o find_xsec.o

DATA_FILE=\

FORM_FILE=\

OBJECTS=$(MODULE_OBJECTS) $(FUNCTION_OBJECTS) $(DATA_STRUCTURE) $(IO_OBJECTS) $(MATH_OBJECTS) $(SOURCE_OBJECTS) 

INPUT=

FC=gfortran
FFLAGS=-c -g
SRCS=$(OBJECTS:.o=.F90)
MODULE=$(MODULE_OBJECTS:.o=.mod)
MF=Makefile
TARGET=sally

%.o : %.mod

.F90.o:
	$(FC) $(FFLAGS) $<

$(TARGET): $(OBJECTS)
	$(FC) -o $@ $(OBJECTS)

tar:
	tar cvf $(TARGET).tar $(MF) $(SRCS) 

clean:
	rm $(OBJECTS) $(MODULE) $(TARGET)

# Module
param.o : param.F90
global.o : global.F90
gi10.o : gi10.F90
fptr.o : fptr.F90
# Function
# Data structure
main.o : main.F90
set_param.o : set_param.F90
dwrite.o : dwrite.F90
dread.o : dread.F90
record_xsec.o : record_xsec.F90
kernel.o : kernel.F90
get_xsec.o : get_xsec.F90
lmess.o : lmess.F90
read_recoil.o : read_recoil.F90
memfree.o : memfree.F90
record_nstop.o : record_nstop.F90
get_nstop.o : get_nstop.F90
get_estop.o : get_estop.F90
check_range.o : check_range.F90
init_fptr.o : init_fptr.F90
read_nstop.o : read_nstop.F90
read_xsec.o : read_xsec.F90
find_next.o : find_next.F90
decompose.o : decompose.F90
prnres.o : prnres.F90
save_xsec.o : save_xsec.F90
save_nstop.o : save_nstop.F90
init_pptr.o : init_pptr.F90
find_nstop.o : find_nstop.F90
find_xsec.o : find_xsec.F90
